<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>


    
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>


	<style>
      
	   
    </style>
</head>


</body>
<script>

class Brush{

}


class Color{
  constructor() {

  }
  printC(){
	console.log(this.getValue())
  }
  printX(){
	console.log(this.x?this.x:"x 不存在");
  }
  getValue(){
	return this.x;
  }
  
}
class Point extends Color{
  constructor() {
	super();
  }
  printP(){
	console.log(this.getValue())
  }
  printY(){
	console.log(this.y?this.y:"y 不存在")
  }
  
  getValue(){
	return this.y;
  }
}
class ColorPoint extends Point {
  constructor(z) {

    super();
	
	this.z = z;
  }
  
  getValue(){
	return this.z;
  }
  printCP(){
	this.printC();
	this.printP();
  }
}


console.log(Object.getPrototypeOf(ColorPoint) === Point);//true
console.log(Object.getPrototypeOf(ColorPoint) === Color);//false
var cp = new ColorPoint(1,2,3);
cp.printCP()
cp.printX()
cp.printY()
console.log("-----------------");
console.log(cp instanceof ColorPoint);
console.log(cp instanceof Point);
console.log(cp instanceof Color);
console.log(cp instanceof Brush);

console.log(cp instanceof Array);
console.log(cp instanceof Object);
</script>
</html>